var mongoose = require("./db.js");

var schema = mongoose.Schema; //模型生成器(表生成器)

//建立表 并且指定字段
var goodsSchema = new schema({
    typeid:{type:mongoose.Schema.Types.ObjectId,ref:"typeinfo"},//类别的编号
    name:String,//商品的名称
    size:String,//尺寸
    img:Array,//集合
});

module.exports = mongoose.model("goods", goodsSchema);